//package com.nanjia.boot.outboundorder.controller;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.nanjia.boot.common.result.PageResult;
//import com.nanjia.boot.common.result.Result;
//import com.nanjia.boot.outboundorder.model.form.OutboundOrderForm;
//import com.nanjia.boot.outboundorder.model.query.OutboundOrderQuery;
//import com.nanjia.boot.outboundorder.model.vo.OutboundOrderVO;
//import com.nanjia.boot.outboundorder.service.OutboundOrderService;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.Parameter;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import jakarta.validation.Valid;
//import lombok.RequiredArgsConstructor;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
///**
// * 商品出库记录前端控制层
// *
// * @author 周洋
// * @since 2025-08-22 17:57
// */
//@Tag(name = "商品出库记录接口")
//@RestController
//@RequestMapping("/api/v1/outbound-order")
//@RequiredArgsConstructor
//public class OutboundOrderController  {
//
//    private final OutboundOrderService outboundOrderService;
//
//    @Operation(summary = "商品出库记录分页列表")
//    @GetMapping("/page")
//    @PreAuthorize("@ss.hasPerm('outboundorder:outbound-order:query')")
//    public PageResult<OutboundOrderVO> getOutboundOrderPage(OutboundOrderQuery queryParams ) {
//        IPage<OutboundOrderVO> result = outboundOrderService.getOutboundOrderPage(queryParams);
//        return PageResult.success(result);
//    }
//
//    @Operation(summary = "新增商品出库记录")
//    @PostMapping
//    @PreAuthorize("@ss.hasPerm('outboundorder:outbound-order:add')")
//    public Result<Void> saveOutboundOrder(@RequestBody @Valid OutboundOrderForm formData ) {
//        boolean result = outboundOrderService.saveOutboundOrder(formData);
//        return Result.judge(result);
//    }
//
//    @Operation(summary = "获取商品出库记录表单数据")
//    @GetMapping("/{id}/form")
//    @PreAuthorize("@ss.hasPerm('outboundorder:outbound-order:edit')")
//    public Result<OutboundOrderForm> getOutboundOrderForm(
//        @Parameter(description = "商品出库记录ID") @PathVariable Long id
//    ) {
//        OutboundOrderForm formData = outboundOrderService.getOutboundOrderFormData(id);
//        return Result.success(formData);
//    }
//
//    @Operation(summary = "修改商品出库记录")
//    @PutMapping(value = "/{id}")
//    @PreAuthorize("@ss.hasPerm('outboundorder:outbound-order:edit')")
//    public Result<Void> updateOutboundOrder(
//            @Parameter(description = "商品出库记录ID") @PathVariable Long id,
//            @RequestBody @Validated OutboundOrderForm formData
//    ) {
//        boolean result = outboundOrderService.updateOutboundOrder(id, formData);
//        return Result.judge(result);
//    }
//
//    @Operation(summary = "删除商品出库记录")
//    @DeleteMapping("/{ids}")
//    @PreAuthorize("@ss.hasPerm('outboundorder:outbound-order:delete')")
//    public Result<Void> deleteOutboundOrders(
//        @Parameter(description = "商品出库记录ID，多个以英文逗号(,)分割") @PathVariable String ids
//    ) {
//        boolean result = outboundOrderService.deleteOutboundOrders(ids);
//        return Result.judge(result);
//    }
//}
